﻿using UnityEngine;
using System.Collections.Generic;

public class CanvasController : MonoBehaviour
{
    public List<Canvas> _canvases = new List<Canvas>();
    
    public Canvas current => _canvases.Count > 0 ? _canvases[0] : null;

    public void Next()
    {
        if (_canvases.Count == 0) return;
        var first = _canvases[0];
        _canvases.RemoveAt(0);
        _canvases.Add(first);
    }

    public void AddCanvas(Canvas newCanvas) => _canvases.Add(newCanvas);

    public void RemoveCanvas(Canvas canvasToRemove) => _canvases.Remove(canvasToRemove);
}